Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIO-8366: API key is not unique translation #5613

Merged
merged 5 commits into from
May 30, 2024

Conversation

ZenMasterJacob20011
Copy link
Contributor

@ZenMasterJacob20011 ZenMasterJacob20011 commented May 23, 2024

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8366

Description

What changed?

  • API key validation errors now are able to be translated using the apiKey property. This is possible now because the apiKey property was added to en.js translation file and the highlightInvalidComponents function which is responsible for setting the apiKey validation error now uses this.t("apiKey") instead of hard coding the error. The apiKey is also passed in the context of what apiKey is causing the error using comp.key.
  • The check to remove "api key is not unique" error message from the form is unnecessary as the check for invalid api keys is made when the form build is saved and the form builder will redraw the components upon saving which removes the apiKey error

Dependencies

How has this PR been tested?

manually

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

Copy link
Contributor

@brendanbond brendanbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing.

@travist
Copy link
Member

travist commented May 24, 2024

You need to write a test for this.

@ZenMasterJacob20011
Copy link
Contributor Author

Added Tests. Also added some render html files generated from running test:updateRenders because if you add a json file to formtest directory the render tests expect a rendered html file of that json in the renders directory

@brendanbond brendanbond merged commit 5038ad4 into master May 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants